
ac.buff('多重之爪'){
    on_add = function(self)
		local unit = self.owner
        self:gc(unit:add('多重数量',1))
    end,
}


ac.buff('点金手'){
    on_add = function(self)
		local unit = self.owner
        self:gc(unit:event '英雄-击杀单位'(function(trg)
            self.item:add_count(1)
            if self.item:get_count()>=100 then
                local gold = math.random(10,100)
                self.item:set_count(0)
                unit.owner:add_icon('金币',gold)
            end
        end))
    end,
}


ac.buff('弹射月刃'){
    on_add = function(self)
		local unit = self.owner
        self:gc(unit:add('弹射次数',1))
    end,
}

ac.item('愈合之甲'){
    cool = 30,
    used_flag = false,
    item_type = 'permanent',
}
ac.buff('愈合之甲'){
    on_add = function(self)
		local unit = self.owner
        self:gc(unit:event '单位-受到伤害'(function()
            if unit:get('当前生命百分比')<20 and self.item:is_cooling()==false then
                self.item:active_cd()
                unit:add_buff '愈合之甲-效果'{
                    time = 5,
                    art = self.art,
                    on_add = function(buff)
                        buff:gc(unit:add('生命恢复',500))
                    end,
                }
            end
        end))
    end,
}

ac.item('祭魂炉'){
    model = [[ktswp_bs.mdl]],
    ['可吞噬'] = true,
}
ac.buff('祭魂炉'){
    on_add = function(self)
		local unit = self.owner
        local player = unit.owner
        local lock = player:get_data('不可吞噬') or {}
        if lock[self.name] then
            self.item:set_count(0)
            return
        end
        self:gc(unit:event '英雄-击杀单位'(function(trg)
            self.item:add_count(1)
            if self.item:get_count()>=500 then
                unit:notify('单位-吞噬物品', unit, self.item)
            end
        end))
    end,
}